package com.center.biz.impl;

import com.center.api.model.EduCourseFavorites;
import com.center.api.remote.RemoteEduCourseFavoritesService;
import com.center.biz.dao.EduCourseFavoritesMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service(version = "1.0",interfaceClass = RemoteEduCourseFavoritesService.class)
public class RemoteEduCourseFavoritesServiceImpl implements RemoteEduCourseFavoritesService {

    @Autowired
    private EduCourseFavoritesMapper eduCourseFavoritesMapper;

    @Override
    public int save(EduCourseFavorites eduCourseFavorites) {
        return eduCourseFavoritesMapper.insertSelective(eduCourseFavorites);
    }

    @Override
    public int update(EduCourseFavorites eduCourseFavorites) {
        return eduCourseFavoritesMapper.updateByPrimaryKeySelective(eduCourseFavorites);
    }

    @Override
    public int delete(int id) {
        return eduCourseFavoritesMapper.deleteByPrimaryKey(id);
    }

    @Override
    public EduCourseFavorites getById(int id) {
        return eduCourseFavoritesMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<EduCourseFavorites> select(EduCourseFavorites eduCourseFavorites) {
        return null;
    }
}
